home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cgraphix / cstxt.c < prev    next >
Text File  |  1986-05-28  |  814b  |  38 lines

  1. /* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
  2. #include    <stdio.h>
  3.  
  4. #define MaxWorldX    1000.0
  5. #define MaxWorldY    1000.0
  6.  
  7. main()
  8. {
  9.     int        i;
  10.     double    CharHeight, CharWidth;
  11.  
  12.     InitGraphic();
  13.  
  14.     DefineWorld(1, 0., 0., MaxWorldX, MaxWorldY);
  15.     SelectWorld(1);
  16.     SelectWindow(1);
  17.     DrawBorder();
  18.  
  19.     GotoXY(39,12);
  20.     DisplayString("* <- This should be at the center \r\n");
  21.     DisplayString("This should be on the next line");
  22.     GotoXY(39,13);
  23.     DisplayString("This should be on the next line");
  24.  
  25.     CharWidth = MaxWorldX / 80.;
  26.     CharHeight = MaxWorldY / 25.;
  27.  
  28.     DrawSquare((double)(9*CharWidth), (double)(7*CharHeight),
  29.         (double)((22*CharWidth)+2), (double)((8*CharHeight)+2), FALSE);
  30.  
  31.     GotoXY(9,7);
  32.     DisplayString("Text in a box");
  33.  
  34.     inkey();
  35.     LeaveGraphic();
  36. }
  37.  
  38.